package com.tywj.lib.lifecycle.livedata

/**
 * <pre>
 *     author : June Yang
 *     time   : 2020/5/13
 *     desc   : 集合元素变化描述类
 *     version: 1.0.0
 * </pre>
 */
class ListChanged(val type: Int) {
    companion object {
        // a change of unknown type has occurred, such as the entire list being set to new values.
        const val TYPE_CHANGED = 1
        // one or more items in the list have changed.
        const val TYPE_ITEM_RANGE_CHANGED = 2
        // items have been inserted into the list.
        const val TYPE_ITEM_RANGE_INSERTED = 3
        // two item change position.
        const val TYPE_ITEM_MOVE = 4
        // items in the list have been deleted.
        const val TYPE_ITEM_RANGE_REMOVED = 5
    }

    var positionStart = 0
    var itemCount = 0
    var fromPosition = 0
    var toPosition = 0
}